package com.tmall.testgen.common.util;

import java.io.IOException;
import java.net.ServerSocket;

public class SocketUtil {
    public static boolean isPortAvailable(int port) {
        try {
            ServerSocket s =new ServerSocket(port);
            s.close();
            return true;
        } catch (IOException e) {
        }
        return false;
    }
}
